package com.hx.net.a;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

/**
 * @author jxlgcmh
 * @create 2019-05-10 15:55
 */
public class TCPClient {
    public static void main(String[] args) throws IOException {
        Socket socket = new Socket("127.0.0.1", 8888);

        OutputStream os = socket.getOutputStream();
        os.write("你好，能接受到吗？".getBytes());
        socket.close();
    }
}
